<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外边距续</title>
</head>
    <style>
        body>div{
            width: 200px;
            height: 200px;
            background-color: red;
            overflow: hidden;/*解决粘连问题*/
        }
        div>div{
            width: 50px;
            height: 50px;
            background-color: green;
            margin-left: 50px;
            /*
            粘连问题:当元素上边缘与上级元素上边缘重叠时,给元素添加
            上边距会出现粘连问题,给上局元素添加overflow:hidden样式解决
            */
            margin-top: 50px;
        }
    </style>
<body>
    <div>
        <div></div>
    </div>
</body>
</html>